package jp.co.systemi.asp.workflow.data;

import java.io.Serializable;
import java.util.Date;

import org.slim3.datastore.Attribute;
import org.slim3.datastore.CreationDate;
import org.slim3.datastore.CreationUser;
import org.slim3.datastore.Model;
import org.slim3.datastore.ModificationDate;
import org.slim3.datastore.ModificationUser;

import com.google.appengine.api.datastore.Key;

@Model
public class LoginHistory implements Serializable {
    private static final long serialVersionUID = -1471164601200928833L;
    @Attribute(primaryKey = true)
    private Key id;
    private String loginId;
    private String password;
    private boolean success; // ログイン成功の場合は、true、失敗の場合は、false
    private Date loginDate;
    private String remoteUser;
    private String remoteAddr;
    private String remoteHost;

    @Attribute(listener = CreationDate.class)
    private Date regDate = null;
    @Attribute(listener = CreationUser.class)
    private com.google.appengine.api.users.User regUser;
    @Attribute(listener = ModificationDate.class)
    private Date updDate = null;
    @Attribute(listener = ModificationUser.class)
    private com.google.appengine.api.users.User updUser;

    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public boolean isSuccess() {
        return success;
    }
    public void setSuccess(boolean success) {
        this.success = success;
    }
    public Key getId() {
        return id;
    }
    public void setId(Key id) {
        this.id = id;
    }
    public String getLoginId() {
        return loginId;
    }
    public void setLoginId(String loginId) {
        this.loginId = loginId;
    }
    public Date getLoginDate() {
        return loginDate;
    }
    public void setLoginDate(Date loginDate) {
        this.loginDate = loginDate;
    }
    public String getRemoteUser() {
        return remoteUser;
    }
    public void setRemoteUser(String remoteUser) {
        this.remoteUser = remoteUser;
    }
    public String getRemoteAddr() {
        return remoteAddr;
    }
    public void setRemoteAddr(String remoteAddr) {
        this.remoteAddr = remoteAddr;
    }
    public String getRemoteHost() {
        return remoteHost;
    }
    public void setRemoteHost(String remoteHost) {
        this.remoteHost = remoteHost;
    }
    public Date getRegDate() {
        return regDate;
    }
    public void setRegDate(Date regDate) {
        this.regDate = regDate;
    }
    public com.google.appengine.api.users.User getRegUser() {
        return regUser;
    }

    public void setRegUser(com.google.appengine.api.users.User user) {
        this.regUser = user;
    }

    public void setUpdUser(com.google.appengine.api.users.User updUser) {
        this.updUser = updUser;
    }

    public com.google.appengine.api.users.User getUpdUser() {
        return updUser;
    }
    public Date getUpdDate() {
        return updDate;
    }
    public void setUpdDate(Date updDate) {
        this.updDate = updDate;
    }
}
